home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / KernelSWIs / s / ReadModeVa < prev    next >
Encoding:
Text File  |  1995-08-26  |  1.2 KB  |  38 lines

  1. ;   ####             #    #     # #
  2. ;   #   #            #    #       #          The FreeWare C library for
  3. ;   #   #  ##   ###  #  # #     # ###             RISC OS machines
  4. ;   #   # #  # #     # #  #     # #  #   ___________________________________
  5. ;   #   # ####  ###  ##   #     # #  #
  6. ;   #   # #        # # #  #     # #  #    Please refer to the accompanying
  7. ;   ####   ### ####  #  # ##### # ###    documentation for conditions of use
  8. ;   ________________________________________________________________________
  9. ;
  10. ;   File:    KernelSWIs.s.ReadModeVa
  11. ;   Author:  Copyright © 1994 Jason Howat
  12. ;   Version: 1.00 (24 Jun 1994)
  13. ;   Purpose: Generic veneer to the OS_ReadModeVariable SWI.
  14.  
  15.         GET     ^.h.regdefs
  16.         GET     ^.h.swinos
  17.         GET     ^.h.macros
  18.  
  19. ; os_error *OS_ReadModeVariable(int mode, mode_variable variable, int *value);
  20.  
  21.         PREAMBLE
  22.         STARTCODE OS_ReadModeVariable
  23. ;
  24.         MOV     ip, sp
  25.         STMFD   sp!, {lr}
  26.         MOV     r3, r2
  27.         SWI     SWI_OS_ReadModeVariable + XOS_Bit
  28.         MOVVC   r0, #0
  29.         ADRCS   r0, error
  30.         CMP     r3, #0
  31.         STRNE   r2, [r3]
  32.         LDMFD   sp!, {pc}^
  33. ;
  34. error   DCD     0
  35.         =       "Invalid mode or variable number",0
  36. ;
  37.         END
  38.